package com.xiaoxiao.springbootstudy.controller;

import com.xiaoxiao.springbootstudy.pojo.TreeTest;
import com.xiaoxiao.springbootstudy.service.TreeTestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@CrossOrigin
public class TreeTestController {
    @Autowired
    TreeTestService treeTestService;

    @GetMapping("/loadTree")
    public List<TreeTest> loadTree() {
        return treeTestService.queryTreeListService();
    }

}
